<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Frame/Pixel Management Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__seglcd__functions__frame.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Frame/Pixel Management Functions<div class="ingroups"><a class="el" href="group__group__seglcd.html">SegLCD       (Segment LCD)</a> &raquo; <a class="el" href="group__group__seglcd__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7f6bb5486ade2f8fe07ae883b1e59be2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#ga7f6bb5486ade2f8fe07ae883b1e59be2">Cy_SegLCD_ClrFrame</a> (LCD_Type *base, uint32_t const *commons)</td></tr>
<tr class="memdesc:ga7f6bb5486ade2f8fe07ae883b1e59be2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the frame buffer and initiates the common lines.  <a href="#ga7f6bb5486ade2f8fe07ae883b1e59be2">More...</a><br /></td></tr>
<tr class="separator:ga7f6bb5486ade2f8fe07ae883b1e59be2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85e7982228c5bc991d43bbfbdb138d5c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#ga85e7982228c5bc991d43bbfbdb138d5c">Cy_SegLCD_InvFrame</a> (LCD_Type *base, uint32_t const *commons)</td></tr>
<tr class="memdesc:ga85e7982228c5bc991d43bbfbdb138d5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverts the frame buffer (all the connected pixel states are inverted).  <a href="#ga85e7982228c5bc991d43bbfbdb138d5c">More...</a><br /></td></tr>
<tr class="separator:ga85e7982228c5bc991d43bbfbdb138d5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga162ed4b35dcc29acfdea0e6b3360b104"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#ga162ed4b35dcc29acfdea0e6b3360b104">Cy_SegLCD_WritePixel</a> (LCD_Type *base, uint32_t pixel, bool value)</td></tr>
<tr class="memdesc:ga162ed4b35dcc29acfdea0e6b3360b104"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets or clears a specified pixel.  <a href="#ga162ed4b35dcc29acfdea0e6b3360b104">More...</a><br /></td></tr>
<tr class="separator:ga162ed4b35dcc29acfdea0e6b3360b104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga60ff7015c394c32846038a43a10d06ca"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#ga60ff7015c394c32846038a43a10d06ca">Cy_SegLCD_ReadPixel</a> (LCD_Type *base, uint32_t pixel)</td></tr>
<tr class="memdesc:ga60ff7015c394c32846038a43a10d06ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the state of a specified pixel.  <a href="#ga60ff7015c394c32846038a43a10d06ca">More...</a><br /></td></tr>
<tr class="separator:ga60ff7015c394c32846038a43a10d06ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf8be6669270e3846e4922fa464ff9b5"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#gadf8be6669270e3846e4922fa464ff9b5">Cy_SegLCD_SetPixel</a> (LCD_Type *base, uint32_t pixel)</td></tr>
<tr class="memdesc:gadf8be6669270e3846e4922fa464ff9b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets (turns on) the specified pixel.  <a href="#gadf8be6669270e3846e4922fa464ff9b5">More...</a><br /></td></tr>
<tr class="separator:gadf8be6669270e3846e4922fa464ff9b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74e99b4c6da5170bece02f6b62facaf4"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#ga74e99b4c6da5170bece02f6b62facaf4">Cy_SegLCD_ClrPixel</a> (LCD_Type *base, uint32_t pixel)</td></tr>
<tr class="memdesc:ga74e99b4c6da5170bece02f6b62facaf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears (turns off) the specified pixel.  <a href="#ga74e99b4c6da5170bece02f6b62facaf4">More...</a><br /></td></tr>
<tr class="separator:ga74e99b4c6da5170bece02f6b62facaf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2bf69a76b6a8179e17b968a1c2fc8973"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__frame.html#ga2bf69a76b6a8179e17b968a1c2fc8973">Cy_SegLCD_InvPixel</a> (LCD_Type *base, uint32_t pixel)</td></tr>
<tr class="memdesc:ga2bf69a76b6a8179e17b968a1c2fc8973"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverts the state of the specified pixel.  <a href="#ga2bf69a76b6a8179e17b968a1c2fc8973">More...</a><br /></td></tr>
<tr class="separator:ga2bf69a76b6a8179e17b968a1c2fc8973"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7f6bb5486ade2f8fe07ae883b1e59be2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7f6bb5486ade2f8fe07ae883b1e59be2">&#9670;&nbsp;</a></span>Cy_SegLCD_ClrFrame()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_ClrFrame </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t const *&#160;</td>
          <td class="paramname"><em>commons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the frame buffer and initiates the common lines. </p>
<p>In general case it is recommended to be called after <a class="el" href="group__group__seglcd__functions__config.html#gae5bce733739f6bbe0a2aa9d2959f2a50">Cy_SegLCD_Init</a> and before <a class="el" href="group__group__seglcd__functions__config.html#ga55eb3d853498593da4eb3cddaca073df">Cy_SegLCD_Enable</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">commons</td><td>The pointer to array of common lines. The array size is specified by <a class="el" href="structcy__stc__seglcd__config__t.html#ad28a0040577c34d63ae68b839e2d9116">cy_stc_seglcd_config_t::comNum</a>. Each common line value should be made using <a class="el" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a> macro.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">/* Scenario: Enable an LCD block */</span></div><div class="line"></div><div class="line"><a class="code" href="structcy__stc__seglcd__config__t.html">cy_stc_seglcd_config_t</a> config =</div><div class="line">{</div><div class="line">    .<a class="code" href="structcy__stc__seglcd__config__t.html#a1be9b9b30d3113fe5c2ce54e6b837740">speed</a> = <a class="code" href="group__group__seglcd__enums.html#ggab22a15df01ec018165a1a7e812f70bb0a280e1ebe0dce993105ffd2d6209055bb">CY_SEGLCD_SPEED_HIGH</a>,</div><div class="line">    .wave = <a class="code" href="group__group__seglcd__enums.html#gga255aa427b265f88cc6e618cdc5491248a5c1a7cd720aedee901d6527dd617f57b">CY_SEGLCD_TYPE_B</a>,</div><div class="line">    .drive = <a class="code" href="group__group__seglcd__enums.html#ggaff012223bec16a8c88dfdb39bd304893a1e4f051430063f293bdfc4ddbe32a27f">CY_SEGLCD_PWM</a>,</div><div class="line">    .bias = <a class="code" href="group__group__seglcd__enums.html#gga2b57420866b0307ca04c1e033790661ca3bac132675f4842763ee46417d83f3a1">CY_SEGLCD_BIAS_FOURTH</a>,</div><div class="line">    .lsClk = <a class="code" href="group__group__seglcd__enums.html#gga4e8bfe5d2149ea8d82ac609367709c95abadf62ab3037855e61b95e5a13be87bb">CY_SEGLCD_LSCLK_LF</a>,</div><div class="line">    .comNum = 8,</div><div class="line">    .frRate = 70,</div><div class="line">    .contrast = 70,</div><div class="line">  <span class="comment">/*.clkFreq is unknown here */</span></div><div class="line">};</div><div class="line"></div><div class="line"><span class="keyword">const</span> uint32_t commons[8] =</div><div class="line">{</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_0, 0UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_1, 1UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_2, 2UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_3, 3UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_4, 4UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_5, 5UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_6, 6UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a>(LCD_COM_7, 7UL)</div><div class="line">};</div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Then in executable code: */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Get the frequency of the assigned peripheral clock divider */</span></div><div class="line">    config.<a class="code" href="structcy__stc__seglcd__config__t.html#ad72440f94cfffb60d7223157722e5769">clkFreq</a>  = <a class="code" href="group__group__sysclk__clk__peripheral__funcs.html#ga366428a7c17da00f7a7ae025aeda2e23">Cy_SysClk_PeriphGetFrequency</a>(<a class="code" href="group__group__sysclk__clk__peripheral__enums.html#gga06138349be16d91fd5d00ded2f4592b8ad2299deae6e36a070de5a60368b319ad">CY_SYSCLK_DIV_8_BIT</a>, 0U);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> == <a class="code" href="group__group__seglcd__functions__config.html#gae5bce733739f6bbe0a2aa9d2959f2a50">Cy_SegLCD_Init</a>(LCD0, &amp;config))</div><div class="line">    {</div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> == <a class="code" href="group__group__seglcd__functions__frame.html#ga7f6bb5486ade2f8fe07ae883b1e59be2">Cy_SegLCD_ClrFrame</a>(LCD0, commons))</div><div class="line">        {</div><div class="line">            <a class="code" href="group__group__seglcd__functions__config.html#ga55eb3d853498593da4eb3cddaca073df">Cy_SegLCD_Enable</a>(LCD0);</div><div class="line">            </div><div class="line">           <span class="comment">/* Now the block generates LCD signals (all the pixels are off) and is ready to turn on any pixel</span></div><div class="line"><span class="comment">            * (or many pixels) using any of the frame/pixel/character/display management API functions.</span></div><div class="line"><span class="comment">            */</span></div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span></div><div class="line">        {</div><div class="line">            <span class="comment">/* error handling */</span></div><div class="line">        }</div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* error handling */</span></div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga85e7982228c5bc991d43bbfbdb138d5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga85e7982228c5bc991d43bbfbdb138d5c">&#9670;&nbsp;</a></span>Cy_SegLCD_InvFrame()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_InvFrame </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t const *&#160;</td>
          <td class="paramname"><em>commons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inverts the frame buffer (all the connected pixel states are inverted). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">commons</td><td>The pointer to an array of common lines. The array size is specified by <a class="el" href="structcy__stc__seglcd__config__t.html#ad28a0040577c34d63ae68b839e2d9116">cy_stc_seglcd_config_t::comNum</a>. Each common line value should be made using <a class="el" href="group__group__seglcd__macros.html#ga5da32950a854641868e98c302afe2fe5">CY_SEGLCD_COMMON</a> macro.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Toggle the state of each pixel to opposite: */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__frame.html#ga85e7982228c5bc991d43bbfbdb138d5c">Cy_SegLCD_InvFrame</a>(LCD0, commons))</div><div class="line">    {</div><div class="line">        <span class="comment">/* error handling */</span></div><div class="line">    }</div><div class="line">    <span class="comment">/* Now all the pixels are inverted statically, however the display/character</span></div><div class="line"><span class="comment">     * management API functions will remain to write symbols non-inverted</span></div><div class="line"><span class="comment">     * until the correspondent display property is also inverted:</span></div><div class="line"><span class="comment">     */</span></div><div class="line">    display.invert = !display.invert;</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga162ed4b35dcc29acfdea0e6b3360b104"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga162ed4b35dcc29acfdea0e6b3360b104">&#9670;&nbsp;</a></span>Cy_SegLCD_WritePixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_WritePixel </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pixel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets or clears a specified pixel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">pixel</td><td>The predefined packed number that points to the pixel location in the frame buffer. </td></tr>
    <tr><td class="paramname">value</td><td>Specifies the pixel on/off state. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">/* Scenario: There is a heart-shaped sign on an LCD glass: */</span></div><div class="line"><span class="preprocessor">#define HEART (CY_SEGLCD_PIXEL(LCD_P11_6, 7UL)) </span><span class="comment">/* Seg: P11_6, Com: 7 */</span><span class="preprocessor"></span></div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Read a pixel value, do some action with it and write it back into the frame */</span></div><div class="line">    <span class="keywordtype">bool</span> pixelValue = <a class="code" href="group__group__seglcd__functions__frame.html#ga60ff7015c394c32846038a43a10d06ca">Cy_SegLCD_ReadPixel</a>(LCD0, HEART);</div><div class="line">    <a class="code" href="group__group__seglcd__functions__frame.html#ga162ed4b35dcc29acfdea0e6b3360b104">Cy_SegLCD_WritePixel</a>(LCD0, HEART, !pixelValue);</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga60ff7015c394c32846038a43a10d06ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga60ff7015c394c32846038a43a10d06ca">&#9670;&nbsp;</a></span>Cy_SegLCD_ReadPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Cy_SegLCD_ReadPixel </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pixel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the state of a specified pixel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">pixel</td><td>The predefined packed number that points to the pixel location in the frame buffer. Each pixel value should be made using <a class="el" href="group__group__seglcd__macros.html#gaacbf9913c4cf4341e7b0594f1069bab0">CY_SEGLCD_PIXEL</a> macro. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Boolean pixel state. If pixel value is invalid - the 'false' is returned.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">/* Scenario: There is a heart-shaped sign on an LCD glass: */</span></div><div class="line"><span class="preprocessor">#define HEART (CY_SEGLCD_PIXEL(LCD_P11_6, 7UL)) </span><span class="comment">/* Seg: P11_6, Com: 7 */</span><span class="preprocessor"></span></div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Read a pixel value, do some action with it and write it back into the frame */</span></div><div class="line">    <span class="keywordtype">bool</span> pixelValue = <a class="code" href="group__group__seglcd__functions__frame.html#ga60ff7015c394c32846038a43a10d06ca">Cy_SegLCD_ReadPixel</a>(LCD0, HEART);</div><div class="line">    <a class="code" href="group__group__seglcd__functions__frame.html#ga162ed4b35dcc29acfdea0e6b3360b104">Cy_SegLCD_WritePixel</a>(LCD0, HEART, !pixelValue);</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gadf8be6669270e3846e4922fa464ff9b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf8be6669270e3846e4922fa464ff9b5">&#9670;&nbsp;</a></span>Cy_SegLCD_SetPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_SetPixel </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pixel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets (turns on) the specified pixel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">pixel</td><td>The predefined packed number that points to the pixel location in the frame buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">/* Scenario: There is a heart-shaped sign on an LCD glass: */</span></div><div class="line"><span class="preprocessor">#define HEART (CY_SEGLCD_PIXEL(LCD_P11_6, 7UL)) </span><span class="comment">/* Seg: P11_6, Com: 7 */</span><span class="preprocessor"></span></div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Set a pixel (write a true value) */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__frame.html#gadf8be6669270e3846e4922fa464ff9b5">Cy_SegLCD_SetPixel</a>(LCD0, HEART))</div><div class="line">    {</div><div class="line">        <span class="comment">/* error handling */</span></div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga74e99b4c6da5170bece02f6b62facaf4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga74e99b4c6da5170bece02f6b62facaf4">&#9670;&nbsp;</a></span>Cy_SegLCD_ClrPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_ClrPixel </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pixel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears (turns off) the specified pixel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">pixel</td><td>The predefined packed number that points to the pixel location in the frame buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">/* Scenario: There is a heart-shaped sign on an LCD glass: */</span></div><div class="line"><span class="preprocessor">#define HEART (CY_SEGLCD_PIXEL(LCD_P11_6, 7UL)) </span><span class="comment">/* Seg: P11_6, Com: 7 */</span><span class="preprocessor"></span></div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Clear a pixel (write a false value) */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__frame.html#ga74e99b4c6da5170bece02f6b62facaf4">Cy_SegLCD_ClrPixel</a>(LCD0, HEART))</div><div class="line">    {</div><div class="line">        <span class="comment">/* error handling */</span></div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga2bf69a76b6a8179e17b968a1c2fc8973"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2bf69a76b6a8179e17b968a1c2fc8973">&#9670;&nbsp;</a></span>Cy_SegLCD_InvPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_InvPixel </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pixel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inverts the state of the specified pixel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">pixel</td><td>The predefined packed number that points to the pixel location in the frame buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">/* Scenario: There is a heart-shaped sign on an LCD glass: */</span></div><div class="line"><span class="preprocessor">#define HEART (CY_SEGLCD_PIXEL(LCD_P11_6, 7UL)) </span><span class="comment">/* Seg: P11_6, Com: 7 */</span><span class="preprocessor"></span></div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Invert a pixel (change the value to opposite) */</span></div><div class="line">    <a class="code" href="group__group__seglcd__functions__frame.html#ga2bf69a76b6a8179e17b968a1c2fc8973">Cy_SegLCD_InvPixel</a>(LCD0, HEART);</div></div><!-- fragment --></dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
